// Dom7
var $$ = Dom7;
// Framework7 App main instance
var app = new Framework7({
	root: '#app', // App root element
	id: 'io.yachtar.app', // App bundle ID
  	name: 'Yachtar', // App name
	theme: 'auto', // Automatic theme detection
	dialog: {
		// set default title for all dialog shortcuts
		title: '提示',
		// change default "OK" button text
		buttonOk: '确认',
	  }
});

// Init/Create main view
var mainView = app.views.create('#view-home', {
	url: '/'
});
var cordova_app = {
    // Application Constructor
    initialize: function() {
        document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
    },
    onDeviceReady: function() {
        this.receivedEvent('deviceready');
    },

    // Update DOM on a Received Event
    receivedEvent: function(id) {
		QRScanner.destroy(function(status){
			console.log(status);
		});
    }
};
cordova_app.initialize();

$(document).ready(function(){
	var houseid = sessionStorage.getItem("houseid");
	document.getElementById("amount").innerHTML = sessionStorage.getItem("payamount");
	call_remote(REQUEST_TYPE29,{houseid:houseid},function(data){
		document.getElementById("location").innerHTML = data[0].location;
	});
});

$$('#ok').on('click', function () {
	window.location.href = "../../plugin/homepage/homepage.html";
});	
$$('#back').on('click', function () {
	window.location.href = "../../plugin/homepage/homepage.html";
});	